import { createRouter, createWebHashHistory, type RouteRecordRaw } from 'vue-router'

import Home from '../views/home/index.vue'
import Order from '../views/order/index.vue'
import Upcoming from '../views/upcoming/index.vue'
import Featured from '../views/featured/index.vue'
import Categories from '../views/categories/index.vue'
import About from '../views/about/index.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'Home',
    component: Home,
  },
  {
    path: '/home',
    redirect: '/',
  },
  {
    path: '/order',
    name: 'Order',
    component: Order,
  },
  {
    path: '/upcoming',
    name: 'Upcoming',
    component: Upcoming,
  },
  {
    path: '/featured',
    name: 'Featured',
    component: Featured,
  },
  {
    path: '/categories',
    name: 'Categories',
    component: Categories,
  },
  {
    path: '/about',
    name: 'About',
    component: About,
  },
]

const router = createRouter({
  history: createWebHashHistory(),
  routes,
})

export default router
